<%@ page import="com.entity.Push_work" %>
<%@ page import="java.util.List" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<%
    String url = request.getContextPath();
    List<Push_work> list = (List<Push_work>) request.getAttribute("list");
%>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>查看作业</title>
    <style>
        body{
            background-image: url("<%=url %>/images/1.jpg");
            font-size: 500px;
            font-family: "";
        }
        table{
            background-color: rgb(33, 110, 161);
            border: 1px;
            margin: 0;
        }
        th{
            border: 2px solid rebeccapurple;
            background-color: rgb(33, 110, 161);
        }
        tr td{
            text-align: center;
            border: 1px solid;
        }
    </style>
</head>
<body>
    <table align="center">
        <tr>
        <th width="300px">id</th>
        <th width="300px">作业名称</th>
        <th width="300px">发布时间</th>
        <th width="300px">作业内容</th>
        <th width="600px">操作</th>
        </tr>
        <c:forEach var="work" items="${list}" varStatus="status">
            <tr>
                <td>
                    <span>${work.id }</span>
                </td>
                <td>
                    <span>${work.workName }</span>
                </td>
                <td>
                    <span>${work.pushDate}</span>
                </td>
                <td>
                    <span>${work.work}</span>
                </td>
                <td>
                   <span>
                      <%-- <a class="viewUser" href="findByidServlet" workid=${work.id } workName=${work.workName }><img src="${pageContext.request.contextPath }/images/read.png" alt="查看" title="查看"/></a>--%>
                       <a class="viewUser" href="findByidServlet?id=${work.id }&workName=${work.workName }&pushDate=${work.pushDate}&work=${work.work}"><img src="${pageContext.request.contextPath }/images/read.png" alt="查看" title="查看"/></a>
                       <a class="viewUser" href="updateByidServlet?id=${work.id }&workName=${work.workName }&pushDate=${work.pushDate}&work=${work.work}"><img src="${pageContext.request.contextPath }/images/xiuGai.png" alt="操作" title="操作"/></a>
                   </span>
                </td>
            </tr>
        </c:forEach>
    </table>
</body>
<script>
    var ses='<%=request.getParameter("ses")%>';
    if(ses=='yes'){
        alert("不可再次更改");
    }
</script>
</html>